<?php

class RobSetStatusAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * @param $userId
     * @param $status
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId,$status) {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_ROB)) {
            return $this->buildResponse(false);
        }
        return $this->buildResponse(
            RobService::get()->setStatus($userId,$status)
        );
    }
}